@extends('admin.layout.flash')
@section('content')
    <link rel="stylesheet" type="text/css" href="{{asset('css/music/amendSP.css')}}">
</head>
<body>
    <div class="box_3">
        <form action="" method="post" enctype="multipart/form-data">
            {{csrf_field()}}
            <input type="hidden" name="id" value="{{$id}}">
            <input type="hidden" name="type" value="{{$type}}">
            <label for="">签约日期：
                <input type="date" name="signed_time" style="width: 180px;margin-right:10px"><input type="hidden">
            </label>
            <select name="sign_time" style="width: 180px;height: 40px">
                <option value="1">1年自动续约</option>
                <option value="2">2年自动续约</option>
                <option value="3">3年自动续约</option>
                <option value="4">自有艺人</option>
            </select><br/>
            <label for="">上传协议：
                <input type="file" class="upload_file" name="agreement" required onchange="doChange(this)" style="display:none;"/>
                <input class="photoCover" type="text" required placeholder="请上传文件" disabled="disabled">
                <input type="button" required onclick="$('input[class=upload_file]').click();" class="mybutton" value="浏览" style="width:100px;margin-left: 51px;"/>
            </label>
            <p style="text-align: center;"><button type="submit" style="background:#CF2121;color:#fff;">确定更新</button></p>
        </form>
    </div>
</body>
    <script>
        function doChange(file){
            var upload_file = $.trim($(".upload_file").val());    //获取上传文件
            $('.photoCover').val(upload_file);     //赋值给自定义input框
        }
    </script>
@endsection

